/* CONTROVERSY AND COSTS */

*CCES 2018 DATA

use "Controversy_and_Costs_Replication_CCES2018.dta" // note:  Stata v.13

*Note:  "Unsure" coded as 0 for DV_vid_binary
tab DV_vid_binary

**************
*Figure 9
*Note: Some additional formatting may have been done using Graph Editor
**************

*install blindschemes package

	*All respondents
logit DV_vid_binary i.VID_Passport_treatments_combined 
margins, at(VID_Passport_treatments_combined=(0(1)1)) 
marginsplot, scheme(plotplain) recast(scatter) 

	*Democrats
logit DV_vid_binary i.VID_Passport_treatments_combined if D0R1==0
margins, at(VID_Passport_treatments_combined=(0(1)1)) 
marginsplot, scheme(plotplain) recast(scatter) 
	
	*Republicans
logit DV_vid_binary i.VID_Passport_treatments_combined if D0R1==1
margins, at(VID_Passport_treatments_combined=(0(1)1)) 
marginsplot, scheme(plotplain) recast(scatter) 


******************************************************************
*Interaction with Passport Ownership (see Supplemental Appendix D)
******************************************************************

	*All respondents
logit DV_vid_binary i.VID_Passport_treatments_combined##i.HasPassport 
margins HasPassport, at(VID_Passport_treatments_combined=(0(1)1))
marginsplot, scheme(plotplain) recast(scatter) legend(ring(0) pos(1)) 
	
	*Democrats
logit DV_vid_binary i.VID_Passport_treatments_combined##i.HasPassport if D0R1==0 
margins HasPassport, at(VID_Passport_treatments_combined=(0(1)1))
marginsplot, scheme(plotplain) recast(scatter) legend(ring(0) pos(1)) 

	*Republicans
logit DV_vid_binary i.VID_Passport_treatments_combined##i.HasPassport if D0R1==1 
margins HasPassport, at(VID_Passport_treatments_combined=(0(1)1))
marginsplot, scheme(plotplain) recast(scatter) legend(ring(0) pos(1))


